package cn.zero.flowspringbootstater.modular.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 审批流程节点
 * </p>
 *
 * @author lei
 * @since 2022-06-17
 */
@Data

@TableName("t_flow_node")
public class FlowNode   {

    private static final long serialVersionUID = 1L;

    private Long id;

    /**
     * 流程号，t_flow.id
     */
    private Long flowId;

    /**
     * 流程节点名称
     */
    private String nodeName;


    /**
     * 流程顺序
     */
    private Long orderBy;

    /**
     * 上一节点id
     */
    private Long preNodeId;

    /**
     * 下一流程节点id
     */
    private Long nextNodeId;

    /**
     * 此节点可审批的用户
     */

    @TableField(exist = false)
    private List<String> userIds;

    /**
     * 此节点的审批事件信息
     */

    @TableField(exist = false)
    private List<FlowEvents> flowEvents;

    @TableField(value="updated_time",fill= FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updatedTime;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(value="created_time",fill= FieldFill.INSERT)
    private LocalDateTime createdTime;


    private String createdBy;

    private String updatedBy;


}
